package cn.sofwin.day0201.homework;

public class Test {
    public static void main(String[] args) {
        String str = "goOd gooD stUdy dAy dAy up";
        int ifFirst = 1;
        for (int i = 0; i < str.length(); i++) {
            while ( i < str.length() && '0' != str.charAt(i)){
                if (ifFirst == 1){
                    if(str.charAt(i) <= 122 && str.charAt(i) >= 97) {
                        str.replace(str.charAt(i), (char)(str.charAt(i) - 32));
                        System.out.println(str.charAt(i));
                        ifFirst = 0;
                        i++;
                    }
                }
                if ((int)str.charAt(i) <= 90 && (int)str.charAt(i) >= 65){
                    str.replace(str.charAt(i), (char)(str.charAt(i) + 32));
                }
                i++;
            }
            ifFirst = 1;
        }
        System.out.println(str);
    }
}
